
from flask import Flask,render_template,url_for

app = Flask(__name__)

@app.route('/')
@app.route('/index')
def index():
    return render_template('index.html')
@app.route('/service')
def service():
    print(url_for('service'))
    return '服务页面'
@app.route('/about')
def about():
    return'关于我们网页'

@app.route('/product_list/<int:page_no>')
@app.route('product_list',defaults={'page_no':1})
def product_list(page_no):
    print(page_no,type(page_no))
    return'商品1，商品2...'
if __name__=='__main__':
    app.run(post=5001)